<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">

<head>
    <title th:text="${pageTitle}"></title>
    <div data-th-replace="layout/head-top"></div>
</head>
<body >

<div  id="excel-form-select">
    <div class="alert alert-warning alert-dismissable m-t">
        <strong>提示说明：</strong>
        <p>1、为了保证数据查询性能两次导出的时间间隔请保持在5分钟以上。</p>
        <p>2、导出的最近下达时间会比当前时间晚5分钟。例如当前时间为19:00:00,那导出订单的最近时间只能选择在18:55:00。</p>
    </div>
    <div class="oc-advSearch-box" style="display: block">
        <form role="form" class="search-form" id="excel-form">
            <input th:if="${type} ==4 or ${type} ==5 " type="hidden" th:name="${type}==4?'couponId':'giftCardId'" th:value="${id}">
            <div class="row">
                <div class="col-sm-4" th:if="${type} == 1">
                    <div>

                        <select class="form-control mb10" name="orderStatus">
                            <option value="">订单状态</option>
                            <option value="SUCCESS">已支付</option>
                            <option value="INIT">未支付</option>
                            <option value="CANCEL">已取消</option>
                            <option value="REFUND">已退费</option>
                        </select>

                    </div>
                </div>
                <div class="col-sm-4" th:if="${type} == 5">
                    <div>

                        <select class="form-control mb10" name="useType">
                            <option value="">礼品卡使用状态</option>
                            <option value="2">已使用</option>
                            <option value="1">未使用</option>
                        </select>

                    </div>
                </div>
                <div class="col-sm-4" th:if="${type} == 4">
                    <div>
                        <select class="form-control vam" name="status">
                            <option value="">优惠券状态</option>
                            <option value="1">未使用</option>
                            <option value="2">已冻结</option>
                            <option value="4">已做废</option>
                            <option value="6">已停止</option>
                            <option value="5">已使用</option>
                        </select>
                    </div>
                </div>
                <div class="col-sm-4" th:if="${type} != 4 and ${type} != 5 and ${type} != 6 and ${type} != 7 and ${type} != 8 and ${type} != 9">
                    <select class="form-control mb10" name="payType">
                        <option value="">支付类型</option>
                        <option value="ALIPAY">支付宝</option>
                        <option value="WEIXIN">微信</option>
                        <option value="IOS">IOS内购</option>
                        <option value="ACCOUNT">账户支付</option>
                        <option value="FREE">免费</option>
                        <option value="COURSE_CART">课程卡</option>
                        <option value="GIVING">赠送</option>
                    </select>
                </div>
                <div class="col-sm-4" th:if="${type} == 1">

                    <select class="form-control mb10" name="sellTypeList">
                        <option value="">商品类型</option>
                        <option value="COURSE">课程</option>
                        <option value="BOOK">图书</option>
                        <option value="QA">问答</option>
                        <option value="MEMBER">会员</option>
                        <option value="ATTEND">旁听</option>
                        <option value="EXAM">试卷</option>
                    </select>
                </div>
                <th:block th:if="${type} == 8">
                <div class="col-sm-4">
                    <select class="form-control ml10" name="status">
                        <option value="0">作业状态</option>
                        <option value="1">未提交</option>
                        <option value="2">已提交</option>
                    </select>
                </div>
                 <div class="col-sm-4">
                <select class="form-control  mb10" name="marked">
                    <option value="0">批阅状态</option>
                    <option value="1">未批阅</option>
                    <option value="2">已批阅</option>
                </select>
                 </div>
                </th:block>
                <div class="col-sm-6" th:if="${type} ==7">
                    <div class="form-group" style="margin-bottom: 10px">
                        <input placeholder="评论时间开始"  id="excelBeginCommentTime" name="beginCommentTime"
                               class="laydate-icon form-control layer-date" type="text" style="max-width: 200px;">
                        -
                        <input placeholder="评论时间结束" id="excelEndCommentTime"  name="endPayCommentTime"
                               class="laydate-icon form-control layer-date" type="text" style="max-width: 200px;">
                    </div>
                </div>
                <div class="col-sm-6" th:if="${type} ==6">
                    <div class="form-group" style="margin-bottom: 10px">
                        <input th:placeholder="开始时间"  id="beginUpdateTime" name="beginUpdateTime"
                               class="laydate-icon form-control layer-date" type="text" style="max-width: 200px;">
                        -
                        <input th:placeholder="结束时间"id="endUpdateTime"  name="endUpdateTime"
                               class="laydate-icon form-control layer-date" type="text" style="max-width: 200px;">
                    </div>
                </div>
                <div class="col-sm-6" th:if="${type} == 1 or  ${type} == 4 ">
                    <div class="form-group" style="margin-bottom: 10px">
                        <input th:placeholder="${type}==4?'使用时间开始':'下单时间开始'"  id="excelBeginCreateTime" th:name="${type}==4?'beginUseTime':'beginCreateTime'"
                               class="laydate-icon form-control layer-date" type="text" style="max-width: 200px;">
                        -
                        <input th:placeholder="${type}==4?'使用时间结束':'下单时间结束'"id="excelEndCreateTime"  th:name="${type}==4?'endUseTime':'endCreateTime'"
                               class="laydate-icon form-control layer-date" type="text" style="max-width: 200px;">
                    </div>
                </div>
                <div class="col-sm-6" th:if="${type} != 4 and ${type} != 5 and ${type} != 6 and ${type} != 7 and ${type} != 8 and ${type} != 9">
                <div class="form-group" style="margin-bottom: 10px">
                    <input th:placeholder="${type}==3?'退款时间开始':'支付时间开始'"  id="excelBeginPayTime" name="beginPayTime"
                           class="laydate-icon form-control layer-date" type="text" style="max-width: 200px;">
                    -
                    <input th:placeholder="${type}==3?'退款时间结束':'支付时间结束'" id="excelEndPayTime" name="endPayTime"
                           class="laydate-icon form-control layer-date" type="text" style="max-width: 200px;">
                </div>
            </div>
                <div class="col-sm-4" th:if="${type} != 4 and ${type} != 5 and  ${type} != 6 and ${type} != 7 and ${type} != 8 and ${type} != 9">
                    <div class="form-group form-box" style="margin-bottom: 10px">
                        <input placeholder="请输入订单号/手机号/昵称" class="form-control common-search-word" type="text"
                               name="keyword">
                    </div>
                </div>
                <div class="col-sm-4" th:if="${type} != 4 and ${type} != 5 and  ${type} != 6 and ${type} != 7 and ${type} != 8 and ${type} != 9">
                    <div class="form-group form-box" style="margin-bottom: 10px">
                        <input placeholder="商品名称" class="form-control" type="text"
                               name="shopName">
                    </div>
                </div>
                <div class="col-sm-6" th:if="${type} ==9">
                    <div class="form-group" style="margin-bottom: 10px">
                        <input placeholder="推广员创建开始时间"  id="beginTime" name="beginTime"
                               class="laydate-icon form-control layer-date" type="text" style="max-width: 200px;">
                        -
                        <input placeholder="推广员创建结束时间" id="endTime"  name="endTime"
                               class="laydate-icon form-control layer-date" type="text" style="max-width: 200px;">
                    </div>
                    <div class="checkbox i-checks">
                        <select class="form-control mb10" name="userType">
                            <option value="">推广员类型</option>
                            <option value="1">一级推广员</option>
                            <option value="2">二级推广员</option>
                        </select>
                    </div>
                    <div class="checkbox i-checks">
                        <select class="form-control mb10" name="createFrom">
                            <option value="">创建来源</option>
                            <option value="1">代创建</option>
                            <option value="2">自申请</option>
                        </select>
                    </div>
                    <div class="checkbox i-checks">
                        <select class="form-control mb10" name="status">
                            <option value="">推广员状态</option>
                            <option value="1">待提交</option>
                            <option value="2">待审核</option>
                            <option value="3">正常</option>
                            <option value="4">禁用</option>
                            <option value="5">驳回</option>
                        </select>
                    </div>
                    <div class="form-group" style="margin-bottom: 10px">
                        <label class="sr-only">推广员名称</label>
                        <input placeholder="请输入推广员名称或手机号" class="form-control common-search-word" type="email">
                    </div>
                </div>
                <div class="col-sm-5">
                    <div class="form-group text-left">
                        <strong class="vam">文件格式:</strong>
                        <select class="form-control" style="display: inline-block;width: 280px;">
                            <option value="">excel</option>
                        </select>
                    </div>
                </div>
                <div class="col-sm-3" th:if="${type} != 4 and ${type} != 5 and ${type} != 6 and ${type} != 8 and ${type} != 9">
                    <div class="form-group pull-right" id="gainDay">
                        <div class="radio i-checks">
                            <label style="padding-left: 0">
                                <div class="iradio_square-green" style="position: relative;">
                                    <input type="radio"  value="1" name="gainDay" style="position: absolute; opacity: 0;">
                                    <ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255); border: 0px; opacity: 0;">
                                    </ins></div> <i></i> 近7天</label>
                            <label class=""><div class="iradio_square-green" style="position: relative;">
                                <input type="radio" value="2" name="gainDay" style="position: absolute; opacity: 0;">
                                <ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255); border: 0px; opacity: 0;">
                                </ins></div> <i></i> 近30天</label>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>
<div data-th-replace="layout/head-footer"></div>
<script type="text/javascript"
        th:src="@{{path}/admin/libs/plugins/layer/laydate/laydate.js?v={v}(path=${staticPath},v=${v})}"></script>
<script type="text/javascript" th:src="@{{path}/admin/business/statistics/time-utils.js?v={v}(path=${staticPath},v=${v})}"></script>
<script>
    var type = [[${type}]];
    $(function () {
        if (type == 6) {
            initTime('beginUpdateTime', 'endUpdateTime', '');
        }
        if (type != 4 && type != 5 && type != 6 && type != 7 && type != 8 && type != 9) {
            initTime('excelBeginPayTime', 'excelEndPayTime', '');
        }
        if (type == 1 || type == 4) {
            initTime('excelBeginCreateTime', 'excelEndCreateTime', '');
        }
        if (type == 9) {
            initTime('beginTime', 'endTime', '');
        }
        if (type == 7) {
            initTime('excelBeginCommentTime', 'excelEndCommentTime', '');
        }
    });
</script>
</body>
</html>
